home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Internet / WWW / swish.11 / src / config.h < prev    next >
Text File  |  1995-12-16  |  5KB  |  162 lines

  1. /*
  2. ** SWISH Default Configuration File
  3. **
  4. ** Kevin Hughes, kevinh@eit.com 
  5. ** 3/11/94
  6. **
  7. ** The following are user-definable options that you can change
  8. ** to fine-tune SWISH's default options.
  9. */
  10.  
  11. #define NEXTSTEP
  12.  
  13. /* You may need to define this if compiling on a NeXTstep machine.
  14. */
  15.  
  16. #define INDEXPERMS 0644
  17.  
  18. /* After SWISH generates an index file, it changes the permissions
  19. ** of the file to this mode. Change to the mode you like
  20. ** (note that it must be an octal number). If you don't want
  21. ** permissions to be changed for you, comment out this line.
  22. */
  23.  
  24. #define PLIMIT 80
  25. #define FLIMIT 256
  26.  
  27. /* SWISH uses these parameters to automatically mark words as
  28. ** being too common while indexing. For instance, if I defined PLIMIT
  29. ** as 80 and FLIMIT as 256, SWISH would define a common word as
  30. ** a word that occurs in over 80% of all indexed files and over
  31. ** 256 files. Making these numbers lower will most likely make your
  32. ** index files smaller. Making PLIMIT and FLIMIT small will also
  33. ** ensure that searching consumes only so much CPU resources.
  34. */
  35.  
  36. #define VERBOSE 0
  37.  
  38. /* You can define VERBOSE to be a number from 0 to 3. 0 is totally
  39. ** silent operation; 3 is very verbose.
  40. */
  41.  
  42. #define MAXHITS 40
  43.  
  44. /* MAXHITS is the maximum number of results to return from a search.
  45. */
  46.  
  47. #define DEFAULT_RULE AND_RULE
  48.  
  49. /* If a list of search words is specified without booleans,
  50. ** SWISH will assume they are connected by a default rule.
  51. ** This can be AND_RULE or OR_RULE.
  52. */
  53.  
  54. #define TITLETOPLINES 12
  55.  
  56. /* This is how many lines deep SWISH will look into an HTML file to
  57. ** attempt to find a <TITLE> tag.
  58. */
  59.  
  60. #define EMPHASIZECOMMENTS 0
  61.  
  62. /* Normally, words within HTML comments are not assigned a higher
  63. ** relevance rank. If you're including keywords in comments
  64. ** define this as 1 so matching results will rise to the top
  65. ** of search results.
  66. */
  67.  
  68. #define MINWORDLIMIT 3
  69.  
  70. /* This is the minimum length of a word. Anything shorter will not
  71. ** be indexed.
  72. */
  73.  
  74. #define MAXWORDLIMIT 30
  75.  
  76. /* This is the maximum length of a word. Anything longer will not
  77. ** be indexed.
  78. */
  79.  
  80. #define ASCIIENTITIES 1
  81.  
  82. /* If defined as 1, all entities in search words and indexed
  83. ** words will be converted to an ASCII equivalent. For instance,
  84. ** with this feature you can index the word "resumé" or
  85. ** "resumé" and it will be indexed as the word "resume".
  86. ** If defined as 0, only numerical entities will be converted
  87. ** to named entities, if they exist.
  88. */
  89.  
  90. #define IGNOREALLV 1
  91. #define IGNOREALLC 1
  92. #define IGNOREALLN 1
  93.  
  94. /* If IGNOREALLV is 1, words containing all vowels won't be indexed.
  95. ** If IGNOREALLC is 1, words containing all consonants won't be indexed.
  96. ** If IGNOREALLN is 1, words containing all digits won't be indexed.
  97. ** Define as 0 to allow words with consistent characters.
  98. ** Vowels are defined as "aeiou", digits are "0123456789".
  99. */
  100.  
  101. #define IGNOREROWV 4
  102. #define IGNOREROWC 5
  103. #define IGNOREROWN 4
  104.  
  105. /* IGNOREROWV is the maximum number of consecutive vowels a word can have.
  106. ** IGNOREROWC is the maximum number of consecutive consonants a word can have.
  107. ** IGNOREROWN is the maximum number of consecutive digits a word can have.
  108. ** Vowels are defined as "aeiou", digits are "0123456789".
  109. */
  110.  
  111. #define IGNORESAME 3
  112.  
  113. /* IGNORESAME is the maximum times a character can repeat in a word.
  114. */
  115.  
  116. #define WORDCHARS "abcdefghijklmnopqrstuvwxyz&#;0123456789"
  117.  
  118. /* WORDCHARS is a string of characters which SWISH permits to
  119. ** be in words. Any strings which do not include these characters
  120. ** will not be indexed. You can choose from any character in
  121. ** the following string:
  122. **
  123. ** abcdefghijklmnopqrstuvwxyz&#;0123456789_\|/-+=?!@$%^'\"`~,.[]{}()
  124. **
  125. ** Note that if you omit "0123456789&#;" you will not be able to
  126. ** index HTML entities. DO NOT use the asterisk (*), lesser than
  127. ** and greater than signs (<), (>), or colon (:).
  128. **
  129. ** Including any of these four characters may cause funny things to happen.
  130. ** If you have a pressing need to index 8-bit characters, please contact
  131. ** me for possible user testing in the future.
  132. **
  133. ** Also note that if you specify the backslash character (\) or
  134. ** double quote (") you need to type a backslash before them to
  135. ** make the compiler understand them.
  136. */
  137.  
  138. #define BEGINCHARS "abcdefghijklmnopqrstuvwxyz&"
  139.  
  140. /* Of the characters that you decide can go into words, this is
  141. ** a list of characters that words can begin with. It should be
  142. ** a subset of (or equal to) WORDCHARS.
  143. */
  144.  
  145. #define ENDCHARS "abcdefghijklmnopqrstuvwxyz;"
  146.  
  147. /* This is the same as BEGINCHARS, except you're testing for
  148. ** valid characters at the ends of words.
  149. */
  150.  
  151. /* Note that if you really want to edit the default stopwords, (words
  152. ** that are deemed too common to be indexed) then you can do so in the
  153. ** file "swish.h". They don't have to be in alphabetical order.
  154. */
  155.  
  156. #define INDEXTAGS 0
  157.  
  158. /* Normally, all data in tags in HTML files (except for words in
  159. ** comments) is ignored. If you want to index HTML files with the
  160. ** text within tags and all, define this to be 1 and not 0.
  161. */
  162.